package org.millioncall.yueyoga.admin.service;

import java.util.List;

/**
 * 信息统计业务类
 * 
 * @author lishoujing
 * @version 1.0.0
 * 
 */
public interface StatisticsService {

	/**
	 * 
	 * @param leftGroupBy
	 *            左侧分组
	 * @param topGroupBy
	 *            上方分组
	 * @param statCol
	 *            统计列名，可以是distinct id
	 * @param function
	 *            聚合函数名称，可以是count,sum,avg,max,min
	 * @return
	 */
	public List<Object[]> commonStatQuery(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function);

	public List<Object[]> memberStatQuery(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function);

	public List<Object[]> clazzStatQuery(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function);

	public List<Object[]> liftClubStatQuery(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function);

	public List<Object[]> taskStatQuery(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function);

	public List<Object[]> goodsStatQuery(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function);

	public List<Object[]> productStatQuery(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function);
	


	/**
	 * 根据查询条件进行分组查询统计信息
	 * @param leftGroupBy
	 * @param topGroupBy
	 * @param statCol
	 * @param function
	 * @param criteria
	 * @return
	 */
	public List<Object[]> memberStatQueryByCdts(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function,String criteria);

	public List<Object[]> clazzStatQueryByCdts(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function,String criteria);

	public List<Object[]> liftClubStatQueryByCdts(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function,String criteria);

	public List<Object[]> taskStatQueryByCdts(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function,String criteria);

	public List<Object[]> goodsStatQueryByCdts(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function,String criteria);

	public List<Object[]> productStatQueryByCdts(List<String> leftGroupBy,
			List<String> topGroupBy, String statCol, String function,String criteria);
	
	/**
	 * 统计查询会籍顾问-工作记录
	 * @param hallCode
	 * @param fromDate
	 * @param toDate
	 * @param keeperId
	 * @return
	 */
	public String statKeeperRecordQuery(String hallCode, String fromDate, String toDate,
			String keeperId);
	
	
}
